using System;
using System.Net;
using System.Net.Sockets;

namespace Server
{
	public delegate void ClientEvent(IPEndPoint client);
	public delegate void ClientDataEvent(IPEndPoint client, byte[] data);
	public delegate void ClientErrorEvent(IPEndPoint client, SocketException error);

	public interface IDemon
	{
		void Start();
		void Stop();
		void Send(IPEndPoint client, byte[] buffer);
		ClientEvent OnConnected {get; set;}
		ClientEvent OnDisconnected {get; set;}
		ClientDataEvent OnData {get; set;}
		ClientErrorEvent OnError {get; set;}
	}
}
